hysop.backend.host.python.operator.integrate module

class hysop.backend.host.python.operator.integrate.PythonIntegrate(**kwds)[source]

Bases: IntegrateBase, HostOperator

Initialize a Integrate operator base.

Integrate a field on it compute domain and put the result in a parameter.

in: field

Possibly as multi-component field that should be integrated.

out: parameter

P = scaling * integral_V(field) where V is the field domain volume and scaling depends on specified scaling method.

parameter

field: Field

Input continuous field to be integrated.

variables: dict

dictionary of fields as keys and topologies as values.

parameter: ScalarParameter or TensorParameter

The output parameter that will contain the integral. Should match field.nb_components. A default parameter will be created if not specified.

scaling: None, float, str or array-like of str, optional

Scaling method used after integration. ‘volumic’: scale by domain size (product of mesh space steps) ‘normalize’: scale by first integration (first value will be 1.0) Can also be a custom float value of tuple of float values. Defaults to volumic integration.

cst: float, optional

Extra scaling constant for volumic mode.

kwds:

Extra keywords arguments that will be passed towards implementation enstrophy operator __init__.

apply(**kwds)

Abstract method that should be implemented. Applies this node (operator, computational graph operator…).